export const setImageSize = (pageInstance, size, index) => {
  //获取图片真实宽度
  let ratio = size.width / size.height; //图片的真实宽高比例
  let viewWidth = 710, //设置图片显示宽度，左右留有16rpx边距
    viewHeight = 710 / ratio; //计算的高度值
  let image = pageInstance.data.images;
  //将图片的data-index作为image对象的key,然后存储图片的宽高值
  image[index] = {
    width: viewWidth,
    height: viewHeight
  }
  pageInstance.setData({
    images: image
  })
}